home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr36 / lod370e.zip / PROGRAMR.ZIP / GLOBALS.PAS < prev    next >
Pascal/Delphi Source File  |  1993-02-19  |  31KB  |  960 lines

  1. unit globals;
  2.  
  3. interface
  4. uses crt,emsalloc;
  5.  
  6. const
  7.  numueqp=6;
  8.  numudev=16;
  9.  numdev=200;
  10.  numobj=2048;
  11.  numst=50;
  12.  numprod=3;
  13.  numbase=75;
  14.  numspell=5;
  15.  numbforsale=5;
  16.  numquest=13;
  17.  numterrain=50;
  18.  hinc=45;
  19.  
  20.  maxmapx=125;
  21.  maxmapy=125;
  22.  maxmapz=1;
  23.  numca=100;
  24.  maxtav=50;
  25.  numtcode=27;
  26.  maxinclude=10;
  27.  
  28.  numpurparts=5;
  29.  kirkpart=1;
  30.  xebocpart=2;
  31.  drakpart=3;
  32.  xebpart=4;
  33.  tranliuspart=5;
  34.  
  35.  ammomax=20;
  36.  vortexbattmax=9999;
  37.  
  38.  maxteams=10;
  39.  maxteamplayers=5;
  40.  
  41.  doauth: boolean=true;
  42.  
  43.  numland=30;
  44.  maxmon=300;
  45.  
  46.  maxpmask=10;
  47.  
  48.  regfilename1: string[5] ='LO';
  49.  
  50.  gamename='Land Of Devastation';
  51.  gamename3: string[32] = 'Land Of Devastation';
  52.  authname='Scott M. Baker';
  53.  vernum='3.70';
  54.  
  55.  regfilename3: string[5] ='G.DAT';
  56.  gamename2: string[32] = 'Land Of Devastation';
  57.  authfile1: string[5] = 'AUTH';
  58.  regfilename2: string[5] = 'DRE';
  59. type
  60.  tpass = (Imp, Pass, Water);
  61.  strptr=^string;
  62.  storetype= (NoStore,Weap,Armr,Supp,Ammo,BaseReact,BaseComm,BaseDef,BaseMoat,
  63.              BaseWeap,computer,weaplr,troysteak,troydisk,gsrz,BaseTele,EEEE,
  64.              town2,town3,town4,town5,town6,town7,town8,town9,
  65.              kill,
  66.              sjunk1,sjunk2,sjunk3,sjunk4,sjunk5,sjunk6,sjunk7,endstore);
  67.  
  68.  maptype=   array[1..maxmapx,1..maxmapy] of byte;
  69.  mapptr=    ^maptype;
  70.  devapptype=(Radio,Medkit,Weapon,RangeWeapon,Armor,AML,BAD,LRScan,AmmoP,
  71.              medline,rope,rations,scanner,stealth,gblaster,armorn,grenade,
  72.              cyceye,deathbadge,warper,communicator,reactor,comm,deffield,
  73.              moat,bweap,laptop,rom,troysteakp,tele,recharge,pylonkey,
  74.              vortexbatt,unitran,mine,boat);
  75.  
  76.  puritronunit=record
  77.                ishere: boolean;
  78.                userrealname: string[25];
  79.                reset: boolean;
  80.                blah: array[1..24] of byte;
  81.               end;
  82.  
  83.  puritrontype=record
  84.                parts: array[1..numpurparts] of puritronunit;
  85.                active: boolean;
  86.                blah: array[1..99] of byte;
  87.               end;
  88.  
  89.  CasinoUnit=record                        { 1 - Coin Flip    }
  90.              timesplayed: longint;        { 2 - Guess number }
  91.              timeswon: longint;           { 3 - Slot Machine }
  92.              timeslost: longint;          { 4 - Trivia       }
  93.              moneyspent: comp;
  94.              moneywon: comp;
  95.              moneylost: comp;
  96.              lastplayer: string[25];
  97.              blah: array[1..10] of word;
  98.             end;
  99.  
  100.  CasinoType=record
  101.              games: array[1..12] of casinounit;
  102.              casblah: array[1..100] of byte;
  103.             end;
  104.  
  105.  datasettype= record
  106.                sdstart,sdend: word;
  107.                name: strptr;
  108.                author: strptr;
  109.                prodname: array[1..3] of strptr;
  110.                menustem: string[8];
  111.                cityname: array[1..10] of strptr;
  112.                hisstr: strptr;
  113.                herstr: strptr;
  114.                itsstr: strptr;
  115.                hestr:  strptr;
  116.                shestr: strptr;
  117.                itstr:  strptr;
  118.                mhimstr: strptr;
  119.                fhimstr: strptr;
  120.                ihimstr: strptr;
  121.                obstart,obend: word;
  122.               end;
  123.  
  124.  sysoptype=  record
  125.               asciitop10: string[128];
  126.               ansitop10: string[128];
  127.               maxtime: word;
  128.              end;
  129.  
  130.  generaltype=record
  131.               startstr: word;            { New Player Starting values }
  132.               startdex: word;
  133.               startagl: word;
  134.               starthp: word;
  135.               startmoney: word;
  136.               startdev1: string[25];
  137.               startdev2: string[25];
  138.               startdev3: string[25];
  139.  
  140.               basecost: longint;         { Cost of fortress           }
  141.               lev2exp: longint;          { level 2 experience         }
  142.               expmul: byte;              { Experience multiplier      }
  143.               levlim: byte;              { Level repeate              }
  144.               levpts: byte;
  145.  
  146.               basestartweap: string[25];
  147.               basestartdef: string[25];
  148.               basestartreact: string[25];
  149.               basestartmoat: string[25];
  150.               basestarttele: string[25];
  151.               basestartene: longint;
  152.               basemaxitems: word;
  153.               playermaxbases: word;
  154.  
  155.               janitorpay: longint;
  156.               killobj: boolean;
  157.  
  158.               statmodeavail: boolean;
  159.               alphamodeavail: boolean;
  160.               reflexmodeavail: boolean;
  161.  
  162.               reflexdelay: word;
  163.               reflexhit: word;
  164.               reflexincr: word;
  165.               alphadelay: word;
  166.               alphahit: word;
  167.  
  168.               LRAnsiLx: byte;
  169.               LRAnsiLy: byte;
  170.               LRAnsiGx: byte;
  171.               LRAnsiGy: byte;
  172.               LRAnsiTx: byte;
  173.               LRAnsiTy: byte;
  174.               LRAnsiBf: byte;
  175.               LRAnsiBb: byte;
  176.               LRAnsiCx: byte;
  177.               LRAnsiCy: byte;
  178.               LRAnsiCf: byte;
  179.               LRAnsiCb: byte;
  180.  
  181.               minloanday: byte;
  182.  
  183.               FSAnsiFx: byte;
  184.               FSAnsiFy: byte;
  185.               FSAnsiFf: byte;
  186.               FSAnsiFb: byte;
  187.               FSAnsiTx: byte;
  188.               FSAnsiTy: byte;
  189.               FSAnsiTf: byte;
  190.               FSAnsiTb: byte;
  191.  
  192.               loanint: byte;
  193.               bankint: byte;
  194.               gameint: byte;
  195.               loanmax: byte;
  196.  
  197.               PTAnsiPx: byte;
  198.               PTAnsiPy: byte;
  199.               PTAnsiPf: byte;
  200.               PTAnsiPb: byte;
  201.               PTAnsiNxo: byte;
  202.               PTAnsiNyo: byte;
  203.               PTAnsiNf: byte;
  204.               PTAnsiNb: byte;
  205.  
  206.               purmoney: array[1..numpurparts] of longint;
  207.               purexp: array[1..numpurparts] of longint;
  208.  
  209.               daystodel: word;
  210.               daystodeldead: word;
  211.  
  212.               inbankmax: longint;
  213.               incasmax: longint;
  214.               inloanmax: longint;
  215.  
  216.               monsellmult: real;
  217.  
  218.               vbattammoeff: array[1..ammomax] of byte;
  219.               vbattammonames: array[1..ammomax] of string[20];
  220.               numvbattammo: word;
  221.  
  222.               PTAnsinx: byte;
  223.               PTAnsiny: byte;
  224.               PTAnsiRx: byte;
  225.               PTAnsiRy: byte;
  226.               PTAnsiRf: byte;
  227.               PTAnsiRb: byte;
  228.               PTAnsiAx: byte;
  229.               PTAnsiAy: byte;
  230.               PTAnsiAf: byte;
  231.               PTAnsiAb: byte;
  232.  
  233.               purquest: array[1..numpurparts] of word;
  234.  
  235.               taxlevel: byte;
  236.               taxpercent: byte;
  237.  
  238.               maxfortattack: byte;
  239.  
  240.               trivia_cost,
  241.               trivia_pay,
  242.               caslimit: longint;
  243.  
  244.               porig: array[1..maxpmask] of byte;
  245.               pnew: array[1..maxpmask] of byte;
  246.  
  247.               LRAnsiC2x: byte;
  248.               LRAnsic2y: byte;
  249.  
  250.               maxtransport: byte;
  251.              end;
  252.  
  253.  devdeftype=record
  254.              num: byte;               { device number               }
  255.              var1,var2: longint;      { start up variables          }
  256.              x,y,z: byte;             { object x,y,z position       }
  257.              devapp: devapptype;      { application type            }
  258.              useleft: word;
  259.              maxuse: word;
  260.              decuse: boolean;
  261.              name: string[18];        { device name                 }
  262.              store: set of storetype; { store it sells at           }
  263.              cost: comp;              { how much it costs           }
  264.              usable: boolean;         { can it be used?             }
  265.              pic: string[8];          { ansi picture identifier     }
  266.              picnum: byte;
  267.             end;
  268.  
  269.  devdeftptr=^devdeftype;
  270.  devdefarray= array[0..numdev] of devdeftptr;
  271.  
  272.  devicetype=record
  273.              num: byte;               { Device Numbers              }
  274.              var1,var2: longint;      { generic variables           }
  275.              x,y,z: byte;             { object x,y,z position       }
  276.              devapp: devapptype;      { application type            }
  277.              useleft: word;           { maximum uses and uses left  }
  278.             end;
  279.  
  280.  sextype =  (male,female,other);
  281.  
  282.  devarray=  array[1..numudev] of devicetype;
  283.  usertype=  record
  284.              realname: string[35];    { real name of user           }
  285.              alias: string[25];       { user's alias                }
  286.              devices: devarray;
  287.              weapon1: devicetype;     { Close combat weapon         }
  288.              weapon2: devicetype;     { Ranged combat weapon        }
  289.              auxweapon: devicetype;   { Auxilary close weapon       }
  290.              armor: devicetype;       { armor                       }
  291.              medline: devicetype;     { Automated medical lining    }
  292.              bad: devicetype;         { B.A.D. - Brainwave Amp      }
  293.              hitpts,hitmax: word;     { user's hitpoints and hitmax }
  294.              badpts,badmax: word;     { Brainwave amp device        }
  295.              str,dex,agl: word;       { strength, dexterity, agil   }
  296.              lvl: word;               { level                       }
  297.              exp: comp;               { experience                  }
  298.              money: comp;             { money                       }
  299.              bank: comp;              { money in the bank           }
  300.              alive: boolean;          { alive ?                     }
  301.              x,y,z: byte;             { x,y,z coords                }
  302.              hunger: word;            { hunger points               }
  303.              expert: boolean;         { expert on?                  }
  304.              combat: longint;         { battles faught in           }
  305.              flee: longint;           { battles fleed in            }
  306.              surrender: longint;      { battles surrendered in      }
  307.              kills: longint;          { number of monsters killed   }
  308.              hits: longint;           { times he hit somebody       }
  309.              misses: longint;         { times he missed somebody    }
  310.              lastread: word;          { message base lastread ptr   }
  311.              enhansi: boolean;        { used enhanced ansi if avail }
  312.              clrmap: boolean;         { color map?                  }
  313.              forceansi: boolean;      { force ansi on?              }
  314.              compass: boolean;
  315.              dietoff: boolean;
  316.              products: array[1..numprod] of comp;
  317.              buysteak: boolean;
  318.              getdisk: boolean;
  319.              didtetris: boolean;
  320.              rent: longint;
  321.              rentday: word;
  322.              lastcity: byte;          { last city user was at       }
  323.              combattext: byte;        { Entry in monsters.txt w/ combat txt }
  324.              timetoday: word;
  325.              sex: sextype;
  326.              flags: byte;
  327.              quests: longint;
  328.              janitor: longint;
  329.              casacct: longint;
  330.              maintrun: word;
  331.              loan: longint;
  332.              maintdelcount: word;
  333.              team: byte;
  334.              fortattack: byte;
  335.              combatmode: byte;
  336.             end;
  337.  
  338.  clonetype=record
  339.             realname: string[35];
  340.             alias: string[25];
  341.             hitmax: word;
  342.             str,dex,agl: word;
  343.             lvl: word;
  344.             exp: comp;
  345.             alive: boolean;
  346.             blah: array[1..10] of byte;
  347.            end;
  348.  
  349.  useridxtype= record
  350.                x,y,z: byte;
  351.                alive: boolean;
  352.               end;
  353.  
  354.  useridxarray= array[1..255] of useridxtype;
  355.  
  356.  
  357.  dstrarray= array[1..numst] of word;
  358.  combattype=record
  359.              player: usertype;        { player who is in combat     }
  360.              typ: byte;
  361.              talkto: word;
  362.              dudepic: word;
  363.              desc: dstrarray;         { description of player       }
  364.              fleetxt: dstrarray;      { what to say when player runs}
  365.              fleeran: dstrarray;      { random flee text            }
  366.              killhim: dstrarray;      { when player kills monster   }
  367.              disintequip: array[1..numueqp] of byte;
  368.              disintinv: array[1..numudev] of byte;
  369.              disintper: word;
  370.              berserk: boolean;
  371.              isreal: word;
  372.              except0: boolean;
  373.             end;
  374.  combatptr= ^combattype;
  375.  
  376.  includetype=record
  377.               code: string[2];
  378.               guy1,guy2: byte;
  379.              end;
  380.  cstrtype=record
  381.            numinclude: word;
  382.            include: array[1..maxinclude] of includetype;
  383.            numstr: word;
  384.            strings: dstrarray;
  385.           end;
  386.  cstrptr=^cstrtype;
  387.  cstrarray=array[1..numca] of cstrptr;
  388.  
  389.  monsterrec= record
  390.               mindist: word;
  391.               maxdist: word;
  392.               origx: byte;
  393.               origy: byte;
  394.               origz: byte;
  395.               line: word;
  396.               str,dex,agl: byte;
  397.               ifalive: byte;
  398.               flags: byte;
  399.              end;
  400.  
  401.  objptr= ^devicetype;
  402.  objarray= array[1..numobj] of objptr;
  403.  terraintype= record
  404.                dng: word;
  405.                typ: string[12];
  406.                map: string[2];
  407.                clr: byte;
  408.                pas: tpass;
  409.               end;
  410.  terrainarray= array[0..numterrain] of terraintype;
  411.  
  412.  baserec = record
  413.             x,y,z: byte;
  414.             owner: byte;
  415.             name: string[20];
  416.             password: string[8];
  417.             active: boolean;
  418.             products: array[1..numprod] of longint; { Products on hand      }
  419.             prodfs:   array[1..numprod] of longint; { Products for sale     }
  420.             prodsp:   array[1..numprod] of word;    { Prod sell prices      }
  421.             prodbp:   array[1..numprod] of word;    { Prod buy prices       }
  422.             prodbm:   array[1..numprod] of longint; { Prod buy money        }
  423.             med:      longint;                      { Medkit doses on hand  }
  424.             medfs:    longint;                      { Medkit doses for sale }
  425.             medprice: word;                         { Price of medkit dose  }
  426.             energyfs: longint;                      { Energy for sale       }
  427.             energyprice: word;                      { Energy price          }
  428.             energy:  comp;                          { Energy on hand        }
  429.             money:   comp;                          { money on hand         }
  430.             teleprice: longint;                     { teleportation price   }
  431.             moat:    devicetype;                    { Moat installed        }
  432.             defense: devicetype;                    { Defense Field         }
  433.             comm:    devicetype;                    { Comm station          }
  434.             weapon:  devicetype;                    { Weapon                }
  435.             reactor: devicetype;                    { Reactor               }
  436.             Tele:    devicetype;                    { Teleporter            }
  437.             basereg: boolean;
  438.             forsale: array[1..numbforsale] of devicetype;    { Devices for sale      }
  439.             saleprice: array[1..numbforsale] of longint;     { For sale prices       }
  440.            end;
  441.  
  442.  basearray= array[1..numbase] of baserec;
  443.  baseptr = ^basearray;
  444.  routept=record
  445.           x,y: byte;
  446.          end;
  447.  routetype = array[1..128] of routept;
  448.  questtype= record
  449.              award: longint;
  450.              mask: longint;
  451.              pts: byte;
  452.             end;
  453.  questarray = array[1..numquest] of questtype;
  454.  
  455.  taverntype= record
  456.               personname: string[20];
  457.               personnum: word;
  458.               townnum: word;
  459.              end;
  460.  
  461.  tavernptr = ^taverntype;
  462.  
  463.  tavernarray=array[1..maxtav] of tavernptr;
  464.  
  465.  telecodetype=record
  466.                c: array[1..4] of byte;
  467.                d: byte;
  468.                z,x,y: byte;
  469.               end;
  470.  telearray=array[1..numtcode] of telecodetype;
  471.  
  472.  daystattype=record
  473.               donations: comp;
  474.               tax: comp;
  475.               plays: word;
  476.               timeused: word;
  477.               datestamp: longint;
  478.               blah: array[1..256] of byte;
  479.              end;
  480.  
  481.  teamtype=   record
  482.               players: array[1..maxteamplayers] of byte;
  483.               numplayers: byte;
  484.               name: string[30];
  485.               pword: string[8];
  486.              end;
  487.  
  488.  teamarray=  array[1..maxteams] of teamtype;
  489. const
  490.  prodbuy: array[1..numprod] of word = (10,10,10);
  491.  citypricemul: array[1..10] of real = (1,1.25,2.13,3.75,4.22,4.75,5.11,5.30,5.75,6.91);
  492.  
  493.  quests: questarray= ((award: 5000;    {1 Get troy his steaks}
  494.                        mask: 1;
  495.                        pts: 1),
  496.                       (award: 3000;    {2 Find location of BW}
  497.                        mask: 2;
  498.                        pts: 1),
  499.                       (award: 15000;   {3 Get into Death Warrior city}
  500.                        mask: 4;
  501.                        pts: 1),
  502.                       (award: 4000;    {4 Play tetris game}
  503.                        mask: 8;
  504.                        pts: 1),
  505.                       (award: 5000;    {5 Find TADSU}
  506.                        mask: 16;
  507.                        pts: 1),
  508.                       (award: 45000;   {6 Fight Xeboc}
  509.                        mask: 32;
  510.                        pts: 1),
  511.                       (award: 30000;   {7 Fight Kirk}
  512.                        mask: 64;
  513.                        pts: 1),
  514.                       (award: 50000;   {8 Talk to Cabal Warrior}
  515.                        mask: 128;
  516.                        pts: 1),
  517.                       (award: 25000;   {9 Talk to spider droid}
  518.                        mask: 256;
  519.                        pts: 1),
  520.                       (award: 5000;    {10 Macroswift windows}
  521.                        mask: 512;
  522.                        pts: 1),
  523.                       (award: 5000;    {11 History}
  524.                        mask: 1024;
  525.                        pts: 1),
  526.                       (award: 15000;   {12 Kill, Inc}
  527.                        mask: 2048;
  528.                        pts: 1),
  529.                       (award: 2000;    {13 Freedom City}
  530.                        mask: 4096;
  531.                        pts: 1));
  532. type
  533.  laptoprec=record
  534.             mask: longint;
  535.             cmdname: string[8];
  536.             cmdext: string[3];
  537.             size: longint;
  538.             date: string[8];
  539.             time: string[6];
  540.            end;
  541. const
  542.  sot=#1;
  543.  ack=#6;
  544.  nak=#21;
  545.  numlapcmd=24;
  546.  LapCmd: array[1..numlapcmd] of  laptoprec =
  547.   ((mask:     0; cmdname: 'DIR';      cmdext: 'COM'; size:   13142; date: '04-27-12'; time: '10:04p'),
  548.    (mask:     0; cmdname: 'EXIT';     cmdext: 'COM'; size:    2714; date: '04-27-12'; time: '10:04p'),
  549.    (mask:     0; cmdname: 'CHKDSK';   cmdext: 'COM'; size:    9535; date: '04-27-12'; time: '10:04p'),
  550.    (mask:     0; cmdname: 'COPY';     cmdext: 'COM'; size:   31244; date: '04-27-12'; time: '10:04p'),
  551.    (mask:     1; cmdname: 'NOTES';    cmdext: 'EXE'; size:   41797; date: '08-12-13'; time: ' 3:39a'),
  552.    (mask:     2; cmdname: 'AUTONAV';  cmdext: 'EXE'; size:  237421; date: '07-26-14'; time: ' 8:17a'),
  553.    (mask:     4; cmdname: 'TRANSFER'; cmdext: 'EXE'; size:   77842; date: '11-09-13'; time: ' 2:32p'),
  554.    (mask:     8; cmdname: 'RANKINGS'; cmdext: 'EXE'; size:   23292; date: '02-17-13'; time: ' 7:24a'),
  555.    (mask:    16; cmdname: 'VIEWLOG';  cmdext: 'COM'; size:   10654; date: '09-30-13'; time: '11:24p'),
  556.    (mask:    32; cmdname: 'EMWARP';   cmdext: 'EXE'; size:  139772; date: '03-11-14'; time: ' 2:49a'),
  557.    (mask:    64; cmdname: 'FORTLIST'; cmdext: 'EXE'; size:   34229; date: '08-14-14'; time: ' 6:52p'),
  558.    (mask:   128; cmdname: 'DIET';     cmdext: 'EXE'; size:  124772; date: '12-03-13'; time: '11:24a'),
  559.    (mask:   256; cmdname: 'CSTATS';   cmdext: 'COM'; size:   27429; date: '07-22-13'; time: ' 3:33a'),
  560.    (mask:   512; cmdname: 'LRSCAN';   cmdext: 'EXE'; size:  118245; date: '09-27-13'; time: ' 1:24p'),
  561.    (mask:  1024; cmdname: 'SCANNER';  cmdext: 'EXE'; size:   96014; date: '04-26-14'; time: ' 7:30a'),
  562.    (mask:  2048; cmdname: 'TROYINFO'; cmdext: 'EXE'; size:  107323; date: '07-19-14'; time: '10:29p'),
  563.    (mask:  4096; cmdname: 'COMMLINK'; cmdext: 'COM'; size:   27094; date: '01-21-14'; time: ' 2:36p'),
  564.    (mask:  8192; cmdname: 'TETRIS';   cmdext: 'EXE'; size:   63294; date: '03-18-13'; time: ' 7:14a'),
  565.    (mask: 16384; cmdname: 'APPRAISE'; cmdext: 'EXE'; size:   72036; date: '04-13-14'; time: ' 9:15p'),
  566.    (mask: 32768; cmdname: 'TCODE';    cmdext: 'EXE'; size:  102997; date: '04-26-14'; time: ' 6:39a'),
  567.    (mask: 65536; cmdname: 'HISTORY';  cmdext: 'COM'; size:   56024; date: '04-23-14'; time: ' 7:04p'),
  568.    (mask:131072; cmdname: 'WINDOWS';  cmdext: 'EXE'; size:69045234; date: '10-02-13'; time: ' 2:29p'),
  569.    (mask:262144; cmdname: 'FORTINV';  cmdext: 'EXE'; size:   10324; date: '05-23-14'; time: ' 6:19a'),
  570.    (mask:524288; cmdname: 'BARTALK';  cmdext: 'COM'; size:   25329; date: '01-19-14'; time: ' 2:22p')
  571.    );
  572. const
  573.  roadtrans: array[0..13] of byte = (51,52,53,54,55,56,57,58,59,60,61,61,51,51);
  574.  rivertrans: array[0..13] of byte = (62,63,64,65,66,67,68,69,70,71,72,72,62,62);
  575.  laketrans: array[0..21] of byte = (73,84,85,86,87,88,89,90,91,74,75,76,77,78,79,80,81,82,83,83,73,73);
  576.  flaglrscan=1;
  577.  flagroaddata=2;
  578.  flagbigdata=4;
  579.  
  580.  flaguserdull=1;         {not using the fancy character sheet}
  581.  flagusersc=2;           {store colors disabled}
  582.  flagusernodel=4;        {set if user is on No-Deletion status}
  583.  flagusernodonate=8;     {set if user is on No-Donations status}
  584.  flagusernorank=16;      {set if user should not be ranked}
  585.  flaguserquick=32;       {set if user is using QUICK gterm}
  586.  
  587.  flagmonisreal=1;        {set if monster uses ISREAL}
  588.  
  589.  flagminesmart=1;        {set if smart mine}
  590.  flagmineenergy=2;       {set if mine is energy drainer}
  591.  flagmineteleport=4;     {set if mine is a teleporter mine}
  592. type
  593.  gmaptype=array[1..9,1..9] of byte;
  594.  datype= array[1..21] of byte;
  595.  miscdatatype= record
  596.                 datavalid: boolean;
  597.                 datainvalid: boolean;
  598.                 lodversion: string[5];
  599.                 username: string[35];
  600.                 useralias: string[35];
  601.                 sysopname: string[35];
  602.                 bbsname: string[35];
  603.                 regname: string[35];
  604.                 reg: boolean;
  605.                 hitmax: word;
  606.                 str,dex,agl: word;
  607.                 level: byte;
  608.                 ureg: boolean;
  609.                end;
  610.  
  611.  gamedatatype= record
  612.                 map: gmaptype;
  613.                 z,x,y: byte;
  614.                 dist: byte;
  615.                 danger: byte;
  616.                 hitpts: word;
  617.                 exper: longint;
  618.                 money: longint;
  619.                 hunger: byte;
  620.                 devpic: datype;
  621.                 devusehi: datype;
  622.                 devuselo: datype;
  623.                 flags: byte;
  624.                 sfgmode: byte;
  625.                 bigpic: byte;
  626.                 timeleft: byte;
  627.                 mapflag: gmaptype;
  628.                 tername: string[12];
  629.                 blah2: array[1..32] of byte;
  630.                end;
  631.  
  632.  nomapdatatype= record
  633.                 hitpts: word;
  634.                 exper: longint;
  635.                 money: longint;
  636.                 hunger: byte;
  637.                 devpic: datype;
  638.                 devusehi: datype;
  639.                 devuselo: datype;
  640.                 flags: byte;
  641.                 sfgmode: byte;
  642.                 bigpic: byte;
  643.                 timeleft: byte;
  644.                 blah: array[1..10] of byte;
  645.                end;
  646.  
  647.  combatdatatype= record
  648.                   monsterpic: byte;
  649.                   playerpic: byte;
  650.                   monsterhit: word;
  651.                   playerhit: word;
  652.                   monsterhp: word;
  653.                   playerhp: word;
  654.                   devpic: datype;
  655.                   devusehi: datype;
  656.                   devuselo: datype;
  657.                   blah: array[1..10] of byte;
  658.                  end;
  659.  
  660.  combatdatabigtype= record
  661.                   monsterpic: byte;
  662.                   playerpic: byte;
  663.                   monsterhit: word;
  664.                   playerhit: word;
  665.                   monsterhp: word;
  666.                   playerhp: word;
  667.                   monsterhpmax: word;
  668.                   playerhpmax: word;
  669.                   hitf8: boolean;
  670.                   unhitf8: boolean;
  671.                  end;
  672.  ansidatatype= record
  673.                 chk: word;
  674.                 name: string[8];
  675.                end;
  676.  rankrec=record
  677.           name: string[14];
  678.           flags: byte;
  679.           percents: array[1..8] of byte;
  680.           blah: array[1..10] of byte;
  681.          end;
  682.  rankdatatype=record
  683.                numrank: byte;
  684.                theuser: rankrec;
  685.                theavg: rankrec;
  686.                rankings: array[1..12] of rankrec;
  687.               end;
  688.  tbufftype=array[1..1024] of byte;
  689. const
  690.  oldgamedatasize=sizeof(gamedatatype)-32-sizeof(gmaptype);
  691.  candobiggamedata: boolean = true;
  692. type
  693.  matrixtype=array[1..3,1..3] of byte;
  694. const
  695.  mapsize=sizeof(maptype);
  696.  authfile3: string[5] = 'I.LOD';
  697.  trivmax=200;
  698.  numpk=20;
  699. { matrixtest: array[1..13] of matrixtype = (
  700.               ((0,1,0),(1,1,1),(0,1,0)),
  701.               ((2,0,2),(1,1,1),(0,1,0)),
  702.               ((0,1,2),(1,1,0),(0,1,2)),
  703.               ((0,1,0),(1,1,1),(2,0,2)),
  704.               ((2,1,0),(0,1,1),(2,1,0)),
  705.               ((0,0,2),(0,1,1),(2,1,0)),
  706.               ((2,0,0),(1,1,0),(0,1,2)),
  707.               ((2,1,0),(0,1,1),(0,0,2)),
  708.               ((0,1,2),(1,1,0),(2,0,0)),
  709.               ((2,0,2),(1,1,2),(2,0,2)),
  710.               ((2,0,2),(2,1,1),(2,0,2)),
  711.               ((2,2,2),(0,1,0),(2,1,2)),
  712.               ((2,1,2),(0,1,0),(2,2,2))
  713.                );}
  714.  
  715.  matrixtest: array[1..13] of matrixtype = (
  716.               ((2,1,2),
  717.                (1,1,1),
  718.                (2,1,2)),
  719.  
  720.               ((2,0,2),
  721.                (1,1,1),
  722.                (2,1,2)),
  723.  
  724.               ((2,1,2),
  725.                (1,1,0),
  726.                (2,1,2)),
  727.  
  728.               ((2,1,2),
  729.                (1,1,1),
  730.                (2,0,2)),
  731.  
  732.               ((2,1,2),
  733.                (0,1,1),
  734.                (2,1,2)),
  735.  
  736.               ((2,0,2),
  737.                (0,1,1),
  738.                (2,1,2)),
  739.  
  740.               ((2,0,2),
  741.                (1,1,0),
  742.                (2,1,2)),
  743.  
  744.               ((2,1,2),
  745.                (0,1,1),
  746.                (2,0,2)),
  747.  
  748.               ((2,1,2),
  749.                (1,1,0),
  750.                (2,0,2)),
  751.  
  752.               ((2,0,2),
  753.                (1,1,2),
  754.                (2,0,2)),
  755.  
  756.               ((2,0,2),
  757.                (2,1,1),
  758.                (2,0,2)),
  759.  
  760.               ((2,2,2),
  761.                (0,1,0),
  762.                (2,1,2)),
  763.  
  764.               ((2,1,2),
  765.                (0,1,0),
  766.                (2,2,2))
  767.  
  768.                );
  769.  
  770.  matrixtest2: array[1..21] of matrixtype = (
  771.               ((1,1,1),
  772.                (1,1,1),
  773.                (1,1,0)),
  774.  
  775.               ((1,1,1),
  776.                (1,1,1),
  777.                (0,1,1)),
  778.  
  779.               ((1,1,0),
  780.                (1,1,1),
  781.                (1,1,1)),
  782.  
  783.               ((0,1,1),
  784.                (1,1,1),
  785.                (1,1,1)),
  786.  
  787.               ((1,1,1),
  788.                (1,1,1),
  789.                (0,1,0)),
  790.  
  791.               ((0,1,1),
  792.                (1,1,1),
  793.                (0,1,1)),
  794.  
  795.               ((0,1,0),
  796.                (1,1,1),
  797.                (1,1,1)),
  798.  
  799.               ((1,1,0),
  800.                (1,1,1),
  801.                (1,1,0)),
  802.  
  803.               ((2,1,2),
  804.                (1,1,1),
  805.                (2,1,2)),
  806.  
  807.               ((2,0,2),
  808.                (1,1,1),
  809.                (2,1,2)),
  810.  
  811.               ((2,1,2),
  812.                (1,1,0),
  813.                (2,1,2)),
  814.  
  815.               ((2,1,2),
  816.                (1,1,1),
  817.                (2,0,2)),
  818.  
  819.               ((2,1,2),
  820.                (0,1,1),
  821.                (2,1,2)),
  822.  
  823.               ((2,0,2),
  824.                (0,1,1),
  825.                (2,1,2)),
  826.  
  827.               ((2,0,2),
  828.                (1,1,0),
  829.                (2,1,2)),
  830.  
  831.               ((2,1,2),
  832.                (0,1,1),
  833.                (2,0,2)),
  834.  
  835.               ((2,1,2),
  836.                (1,1,0),
  837.                (2,0,2)),
  838.  
  839.               ((2,0,2),
  840.                (1,1,2),
  841.                (2,0,2)),
  842.  
  843.               ((2,0,2),
  844.                (2,1,1),
  845.                (2,0,2)),
  846.  
  847.               ((2,2,2),
  848.                (0,1,0),
  849.                (2,1,2)),
  850.  
  851.               ((2,1,2),
  852.                (0,1,0),
  853.                (2,2,2))
  854.  
  855.                );
  856.  
  857.  authfile2: string[5] = 'ENT';
  858. var
  859.  nomap: nomapdatatype;
  860.  combatdata: combatdatatype;
  861.  combatdatabig: combatdatabigtype;
  862.  lastgamedata,gamedata: gamedatatype;
  863.  lastmiscdata,miscdata: miscdatatype;
  864.  rankdata: rankdatatype;
  865.  tbuffp: EAPointer;
  866. type
  867.  idrec=record
  868.         poslo: word;
  869.         poshi: byte;
  870.        end;
  871.  idarray=array[0..1] of idrec;
  872.  idarrayptr = ^idarray;
  873. var
  874.  {GAME DEF STUFF}
  875.  gamedef: text;
  876.  gamebin: file;
  877.  talkstart: word;
  878.  trellstart, trellend: word;
  879.  troystart, troyend: word;
  880.  histstart, histend: word;
  881.  dataset: datasettype;
  882.  {OTHER STUFF}
  883.  gterm_lastlr: gmaptype;
  884.  gterm_lastlrz,gterm_lastlrx,gterm_lastlry: byte;
  885.  gterm_needlrupdate: boolean;
  886.  gterm_lrpresent: boolean;
  887.  gterm_invscroll: word;
  888.  gterm_comport: word;
  889.  gterm_baud_rate: word;
  890.  gterm_lodusername: string[40];
  891.  gterm_local: boolean;
  892.  sysopdata: sysoptype;
  893.  telecodes: telearray;
  894.  autonavx,autonavy,autonavz: byte;
  895.  general: generaltype;
  896.  terrain: terrainarray;
  897.  devicedef: devdefarray;
  898.  nummondef: word;
  899.  mondef: array[1..maxmon] of EAPointer;
  900.  filesopen: boolean;
  901.  exitsave: pointer;
  902.  usernum: byte;
  903.  user: usertype;
  904.  userfile: file of usertype;
  905.  useridx: useridxarray;
  906.  imap: array[1..numdev] of byte;
  907.  numitems: byte;
  908.  zmap: mapptr;
  909.  clonefile: file of clonetype;
  910.  objects: objarray;
  911.  numolist: word;
  912.  pchar,mchar,dchar: combatptr;
  913.  needredraw: boolean;
  914.  realansi: boolean;
  915.  bases: baseptr;
  916.  medcount: word;
  917.  gtermon: boolean;
  918.  lastmove: boolean;
  919.  strdefbytes: word;
  920.  dietcount: word;
  921.  numgroups: word;
  922.  groups: cstrarray;
  923.  tavern: tavernarray;
  924.  numtav: word;
  925.  tryems: boolean;
  926.  numstrdef: word;
  927.  checkmulti: boolean;
  928.  lokexitsave: pointer;
  929.  automaint: boolean;
  930.  usemod: boolean;
  931.  moddev: integer;
  932.  modqual: byte;
  933.  forceremoteaudio: boolean;
  934.  memstart: longint;
  935.  purmask: array[0..numterrain] of byte;
  936.  havepurmask: boolean;
  937.  enhon: boolean;
  938.  
  939.  pkup: array[1..numpk] of word;
  940.  pksend: array[1..numpk] of word;
  941.  pkbyte: array[1..numpk] of longint;
  942.  
  943.  puritron: puritrontype;
  944.  CasinoStats: EAPointer;
  945.  DayStats: EAPointer;
  946.  teams: EAPointer;
  947.  
  948.  timeusedstart: word;
  949.  
  950.  trivquest: array[1..trivmax] of byte;
  951.  
  952.  devfill,devgood,devnil: word;
  953.  
  954.  strdefid: pointer;
  955.  didpause: boolean;
  956.  
  957. implementation
  958.  
  959. end.
  960.